import QtQuick 1.1

Image {
    smooth: true

    property variant picts: []
    property int index: 0

    onIndexChanged: {
        changePict();
    }
    onPictsChanged: {
        changePict();
    }

    function changePict(){
        if(picts.length > 0){
            opacity = 1;
            if(0 <= index && index < picts.length){
                source = picts[index];
            }else{
                opacity = 0;
            }
        }else{
            opacity = 0;
        }
    }
}
